<?php include_once 'lib/negocios/file_utils/fileUtils.php';
	include_once 'lib/negocios/Busca/alocacaoHorarioNaoFixo.php';
	include_once 'lib/interface/tabelaUtils.php';
?>
<html>
  <head>
  </head>
  <body>
    <?php 
    
    	ini_set("memory_limit", "512M");
    	ini_set("max_execution_time", "60");
    	
    	/*$fu = new FileUtils();
    	$lista = $fu->load("TesteDisciplina02.txt");
    	$listaCursos = $fu->splitDisciplinasCurso($lista);
    	echo $listaCursos[0]->getSerie(0)->getDisciplina(0)->getProfessor()->getNome();*/
    	
    	$alocacao = new  AlocacaoHorarioNaoFixo();
    	$alocacao->loadListas();
    	$alocacao->montarEspacoEstados();
    	$salas = $alocacao->getListaSalas();
    	
    	$tab =  new TabelaUtils();
    	
    	foreach($salas as $sala){
    		echo "<br/><br/><br/>  SALA = " . $sala->getId() . "<br/><br/>";
    		$aulas = $sala->getMatrizAulas();
    		
    		echo $tab->montaTabelaHTML($aulas);
    		
    		/*$i = 0;
    		foreach ($aulas as $dias) {
    			$j = 0;
    			echo "=== DIA : $i <br/>";
    			foreach ($dias as $aula) {
    				if ($j == 6) {
    					echo "======= ALMOCO =========<br/>";
    				}
    				if ($aula != null) {
	    				echo "//" . $aula->getDisciplina()->getNome() . "<BR/>";
	    				echo "//// Hora $j<BR/><BR/>";
    				}
    				$j++;
    			}
    			$i++;
    		}
    		/*for ($i = 0; $i < SalaAula::$MAX_DIAS; $i++){
    			for ($j = 0; $j < SalaAula::$MAX_HORAS; $j++){
    				$sala->getMatrizAulasPos($i,$j)->getDisciplina()->getNome();
    			}
    		}*/
    		
    	}
    	
    ?>
  </body>
</html>